public class problem {
    public static int max(int a,int b){
        return a>b?a:b;
    }


    public static double max(double c,double  d,double  e){
        double max=c;
        if(d>max){
            max=d;
        }
        if(e>max){
            max=e;
        }
        return max;
    }

    public static void main(String[] args) {
//方法重载
        int a=8;
        int b=5;
        System.out.println(max(a,b));

        double c=1.3;
        double d=2.7;
        double e=0.7;
        System.out.println(max(c,d,e));
    }




    public static int add(int a,int b){
        return a+b;
    }


    public static double add(double c,double  d,double  e){
        return c+d+e;
    }

    public static void main3(String[] args) {
//方法重载
        int a=8;
        int b=5;
        System.out.println(add(a,b));


        double c=1.3;
        double d=2.7;
        double e=3.7;
        System.out.println(add(c,d,e));
    }



    public  static int fac(int n){
        if(n==1||n==2){
            return 1;
        }
        int a=1;
        int b=1;
        int c=-1;
        int i=0;
       for(i=3;i<=n;i++){
           c=a+b;
           a=b;
           b=c;
       }
       return  c;
    }

    public static void main2(String[] args) {
        //求斐波那契数列的第n项
        System.out.print((fac(3))+" ");


    }




    public  static int max2(int a,int b){
        return a>b?a:b;
    }
    public  static int max3(int a,int b,int c){
        return max2(a,b)>c?max2(a,b):c;
    }

    public static void main1(String[] args) {
        System.out.println(max3(1,2,6));
    }
}
